<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>流程详情</title>
<link rel="stylesheet" href="resource/css/layui.css">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="renderer" content="webkit" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="format-detection" content="telephone=no" />
<link rel="stylesheet" href="css/global.css" media="all">
<link rel="stylesheet" href="css/font-awesome/css/font-awesome.min.css">
<style type="text/css">
body {
	width: 99%;
	height: auto;
	position: absolute;
}

.workframdiv {
	width: 100%;
	height: 90%;
	text-align: center;
}

.operdiv {
	width: 100%;
	height: 10%;
	text-align: center;
	margin: 20px;
}

#workflowframe {
	border: 0px solid gray;
	width: 90%;
}

.title{
	color: red;
	font-size: 30px;
	text-align: center;
	margin-top: 20px;
}

.subtitle{
	font-size: 20px;
}

</style>
</head>
<body>
	<div class="title">
		<strong th:text="${definition.workflowName}"></strong>
		<p class="subtitle" th:if="${status.formId} != null" th:text="'流程编号：'+${status.formId}"></p>
	</div>
	
	<hr class="layui-bg-red">

	<div class="workframdiv">
		<iframe id="workflowframe" th:src="${definition.detailPage}+'?'+${params}"></iframe>
	</div>

	<hr class="layui-bg-black">
	<div class="operdiv" th:if="${status.enable} eq 'Y'">
		<button th:if="${status.isStart eq 'Y'}" class="layui-btn layui-btn-lg layui-btn-radius" onclick="commit()">提交</button>
		<button class="layui-btn layui-btn-lg layui-btn-radius" onclick="save()">仅保存</button>
		<button th:if="${status.isStart eq 'N'} and ${status.isEnd eq 'N'}" class="layui-btn layui-btn-lg layui-btn-radius" onclick="agreeNext()">同意并下一步</button>
		<button th:if="${status.isStart eq 'N'}" class="layui-btn layui-btn-lg layui-btn-radius layui-btn-danger" onclick="reject()">退回</button>
		<button th:if="${status.isStart eq 'N'}" class="layui-btn layui-btn-lg layui-btn-radius layui-btn-danger" onclick="deletee()">作废</button>
		<button th:if="${status.isEnd eq 'Y'}" class="layui-btn layui-btn-lg layui-btn-radius layui-btn-primary" onclick="agreeEnd()">同意并结束</button>
	</div>
	
	<div th:if="${nextStep != null}">
		<input type="hidden" id="nextRole" th:value="${nextStep.roleId}">
		<input type="hidden" id="nextStepName" th:value="${nextStep.stepName}">
	</div>
	
	<script src="resource/layui.js"></script>
	<script type="text/javascript" th:inline="javascript" src="js/workflow_detail.js"></script>
</body>

</html>